import request from '@/utils/request'

/**
 *
 * @param {*} data
 * @returns
 */

// 封装了
export function getCardListAPI(params) {
    return request({
        url: '/parking/card/list',
        method: 'get',
        params
    })
}

/**
 *添加接口封装
 */

export function CreateCardAPI(data) {
    return request({
        url: '/parking/card',
        method: 'post',
        data
    })
}

/**
 *封装获取月卡编辑信息
 */

export function getDetailAPI(id) {
    return request({
        url: `/parking/card/detail/${id}`,
    })
}



/**
 *封装编辑月卡接口
 */

export function upDateCardAPI(data) {
    return request({
        url: '/parking/card/edit',
        method: 'put',
        data
    })
}


/**
 *封装删除接口
 */

export function detelteCardAPI(id) {
    return request({
        url: `/parking/card/${id}`,
        method: 'delete',
    })
}